package com.xiaomaoguai.security.mock;

import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.configureFor;
import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.removeAllMappings;
import static com.github.tomakehurst.wiremock.client.WireMock.stubFor;
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;

/**
 * @fileName: MockServer.java
 * @author: WeiHui-Z
 * @date: 2017/11/22 19:15
 * @version: v1.0.0
 */
public class MockServer {


    public static void main(String[] args) {
        configureFor(8080);
        removeAllMappings();
        stubFor(get(urlPathEqualTo("/order/1"))
                .willReturn(aResponse().withBody("{\"id\":\"1\"}").withStatus(200)));
    }

}
